<?php /* Smarty version 2.6.26, created on 2018-07-20 02:32:16
         compiled from E:%5CWWW%5C40.125.208.171%5Cvweb/admin%5Ctemplates/goods_act/seckill.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'img_size', 'E:\\WWW\\40.125.208.171\\vweb/admin\\templates/goods_act/seckill.html', 34, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index/header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> 
<div class="nav"><span>打折优惠</span></div>
<div class="filter"> 
	<a href="?m=goods_act&a=seckill" class="<?php if ($_GET['status'] == ''): ?>option_ch<?php else: ?>option<?php endif; ?>">全部</a>
	<a href="?m=goods_act&a=seckill&status=1" class="<?php if ($_GET['status'] == '1'): ?>option_ch<?php else: ?>option<?php endif; ?>">已通过</a>
	<a href="?m=goods_act&a=seckill&status=0" class="<?php if ($_GET['status'] == '0'): ?>option_ch<?php else: ?>option<?php endif; ?>">已申请</a> 
	<form action="#" method="get">
		<input type="hidden" name="m" value="goods"/>	
		<input type="hidden" name="a" value="index"/>
		<div class="sch">
			<input type="text" name="key" class="text" value="" placeholder="请输入产品关键字"/>
			<input type="submit" class="submit" value="确定"/>
		</div>
	</form> 
</div>
<div class="main"> 
	<table class="ltable">
	  	<thead>
		  	<tr> 
				<th width="40">图片</th>
				<th width="380">标题</td> 
				<th width="120">开始时间</th>
				<th width="120">结束时间</th> 
				<th width="60" class="center">通过</th>
				<th width="70">操作</th>
				<th width="120">时间</th>
				<th></th>
		  	</tr>
	  	</thead>
		<tbody>
	<?php if ($this->_tpl_vars['data']['list']): ?>
		<?php $_from = $this->_tpl_vars['data']['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['i']):
?>
			<tr> 
				<td><a href="index.php?m=goods&a=detail&id=<?php echo $this->_tpl_vars['i']['gid']; ?>
" target="_blank"><img src="<?php echo $this->_tpl_vars['__IMG__']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['i']['images'])) ? $this->_run_mod_handler('img_size', true, $_tmp, '50x50') : $this->_plugins['modifier']['img_size'][0][0]->img_size($_tmp, '50x50')); ?>
" width="35" height="35"/></a></td> 
				<td valign="top"><a href="index.php?m=goods&a=detail&id=<?php echo $this->_tpl_vars['i']['gid']; ?>
" target="_blank"><?php echo $this->_tpl_vars['i']['title']; ?>
</a></td> 
				<td><?php echo $this->_tpl_vars['i']['start_time']; ?>
</td>
				<td><?php echo $this->_tpl_vars['i']['end_time']; ?>
</td>  
				<td class="center"><a href="javascript:status('<?php echo $this->_tpl_vars['i']['id']; ?>
','status')" id="status_<?php echo $this->_tpl_vars['i']['id']; ?>
"><img src="<?php echo $this->_tpl_vars['__APP__']; ?>
public/images/status_<?php echo $this->_tpl_vars['i']['status']; ?>
.png"></a></td> 
				<td><a href="javascript:;" data-id="<?php echo $this->_tpl_vars['i']['id']; ?>
" class="del">删除</a></td>
				<td><?php echo $this->_tpl_vars['i']['addtime']; ?>
 </td>
				<td></td>
			</tr>
		<?php endforeach; endif; unset($_from); ?>
	<?php else: ?>
	  		<tr><td colspan="13">还没有数据，赶快添加吧！</td></tr>
	<?php endif; ?>
		</tbody>
	</table>
	<?php if ($this->_tpl_vars['data']['page']): ?>
		<div class="operate">
			<div class="tpage"><?php echo $this->_tpl_vars['data']['page']; ?>
</div>
		</div>
	<?php endif; ?>
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index/footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> 
<script type="text/javascript">
_delete("?m=goods_act&a=seckill_del", '.del_ck');
function status(id,type){
	$.post("?m=goods_act&a=seckill_status",{id:id, type:type},function(data){
 		if(data == '0' || data == '1'){
			$("#"+type+"_"+id+" img").attr('src','<?php echo $this->_tpl_vars['__APP__']; ?>
public/images/status_'+data+'.png');
		}else{ alert('更新失败'); } 
	});	
} 
</script>